﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MRGSP.SurveyMaster.Infra.Dto.UserEditInput>" %>

<%@ Import Namespace="MRGSP.SurveyMaster.Localization" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Create
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
    $(function() {
        $("#NewPassword").val("");
    });
</script>
    <h2>Edit user</h2>
    <fieldset>
            <form method="post" action="<%=Url.Action("Edit") %>">
            <%=Html.HiddenFor(o => o.Id) %>
            <div class="efield">
                <div class="elabel">
                    <label for="Password">
                        <%=MUI.Password %></label>
                </div>
                <div class="einput">
                    <%= Html.PasswordFor(o => o.NewPassword) %>
                    <%= Html.ValidationMessageFor(o => o.NewPassword) %>
                </div>
            </div>
            <%if (User.Identity.Name != Model.Login)
              {%>
            <div class="efield">
                <div class="elabel">
                    <label for="Role">
                        <%=MUI.Role%></label>
                </div>
                <div class="einput">
                    <%=Html.DropDownList("Role")%>
                    <%=Html.ValidationMessageFor(o => o.Role)%>
                </div>
            </div>
            <%
                }%>
            <div class="esubmit">
                <input type="submit" value="submit" />
            </div>
            </form>
        </fieldset>
</asp:Content>
